package tw.cuttle.process.spring;
 
import org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext;

import tw.cuttle.process.MethodInvokeSupport;

public class OsgiSpringBeanSupport extends MethodInvokeSupport{
    private static OsgiBundleXmlWebApplicationContext ctx;
	public static OsgiBundleXmlWebApplicationContext getCtx() {
		return OsgiSpringBeanSupport.ctx;
	}
	public static void setCtx(OsgiBundleXmlWebApplicationContext ctx) {
	    OsgiSpringBeanSupport.ctx = ctx;
	}
    @Override
    protected Object getBean(String beanName) {
	return ctx.getBean(beanName);
    }

}
